using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace MyEmulators2
{
    //The super class to all the content panels in the Configuration form

    class ContentPanel : UserControl
    {
        public bool isInitialized;

        public ContentPanel()
        {
            Width = 525;
            Height = 309;
            Top = 0;
            Left = 0;
            isInitialized = false;
            Resize += new EventHandler(resize);
        }

        public virtual void init() { isInitialized = true; }
        public virtual void update() { }
        public virtual void save() { }
        public virtual void keyDown(object sender, KeyEventArgs e) { }
        public virtual void resize(object sender, EventArgs e) { }
        public virtual void close() { }

        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);
        }

        public event UpdatedPanelEventHandler changeEvent;
        public virtual void OnChange(Object sender, EventArgs e)
        {
            if (changeEvent != null)
            {
                changeEvent(sender, e);
            }
        }

        public Form form
        {
            get;
            set;
        }
    }
}
